package com.fanghuaiming.tsec.order.service.impl;

import com.fanghuaiming.tsec.order.dao.mapper.TsecOrderMapper;
import com.fanghuaiming.tsec.order.dao.model.TsecOrder;
import com.fanghuaiming.tsec.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/****
 * @description: 订单服务接口实现类
 * @version:1.0.0
 * @author fanghuaiming
 * @data Created in 2020/11/27 下午1:59
 *
 */
@Service
@Slf4j
public class OrderServiceImpl implements OrderService {

    /**
     * 订单dao
     */
    @Autowired
    private TsecOrderMapper tsecOrderMapper;

    /**
     * @Description: 生成订单
     *
     * @param:
     * @return:
     * @auther: fanghuaiming
     * @date: 2020/12/1 下午2:30
     * @version:1.0.0
     */
    @SuppressWarnings("all")
    @Transactional
    @Override
    public void createOrder(TsecOrder tsecOrder) {
        log.info("==========订单Service开始创建订单==========");
        tsecOrderMapper.createOrder(tsecOrder);
        log.info("==========订单Service创建订单完成==========");
    }

}
